<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/

/**
 * Description of OgHtmlclass
 *
 * @author martin
 */
class OgHtmlJQueryUIDocument extends OgHtmlDocument {



  public function  __construct() {
    parent::__construct();
    $this->initComponents();
  }



  private function initComponents() {
    $jQuery = new OgElement('script');
    $jQuery->addAttribute('type', 'text/javascript');
    $jQuery->addAttribute('src', OgConfiguration::singleton()->getPath('jQuery'));

    $jQueryUi = new OgElement('script');
    $jQueryUi->addAttribute('type', 'text/javascript');
    $jQueryUi->addAttribute('src', OgConfiguration::singleton()->getPath('jQueryUI'));

    $jQueryCss = new OgElement('link');
    $jQueryCss->addAttribute('type', 'text/css');
    $jQueryCss->addAttribute('href', OgConfiguration::singleton()->getPath('jQueryUICss'));
    $jQueryCss->addAttribute('rel', 'stylesheet');

    $this->getHeader()->addComponent($jQueryCss);
    $this->getHeader()->addComponent($jQuery);
    $this->getHeader()->addComponent($jQueryUi);
    
  }



}
?>
